package com.rybbaby.tss.front.tssClasses.dao.imp;

import com.rybbaby.tss.core.web.dao.imp.GenericDao;
import com.rybbaby.tss.front.tssClasses.dao.ViewTssClassChangeDao;
import com.rybbaby.tss.front.tssClasses.entity.ViewClassesChange;
import org.springframework.stereotype.Repository;

import java.util.List;


/**
 * @description 班级变动试图实现
 * 
 * @author 杨然
 * 
 * @createDate 2017-08-09 下午11:50:14
 */
@Repository
public class ViewTssClassChangeDaoImp extends GenericDao<ViewClassesChange> implements ViewTssClassChangeDao {


    public List<ViewClassesChange> getAllList(Integer type) {
        String hql = "from ViewClassesChange where type ="+type;
        return this.findByHql(hql);
    }

    public List<ViewClassesChange> findByIds(List<String> ids) {
        //String hql = "from ViewClassesChange where type= "+type+" and classesId in("+ids+")";

        return this.loadByMultipleId(ViewClassesChange.class, ids);
    }
}
